home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / gfx / pbm / netpbm2.lha / netpbm / vms / Add_List.com next >
Text File  |  1993-10-04  |  2KB  |  60 lines

  1. $ VERIFY = F$Verify (0)
  2. $!
  3. $!     ADD_LIST.COM command procedure
  4. $!         Usage:
  5. $!             ADD_LIST library file_spec [logical_name_table]
  6. $!
  7. $!     Last Modified: 18-JAN-1991 Rick Dyson
  8. $!
  9. $!     Escape routes
  10. $ On Control_Y Then GoTo FINISH
  11. $ On Error     Then GoTo FINISH
  12. $ On Warning   Then GoTo FINISH
  13. $ On Severe    Then GoTo FINISH
  14. $!
  15. $!     We're out'a here if the calling parameter is null
  16. $ P2 = F$Edit (P2, "TRIM, UPCASE")
  17. $ If P2 .eqs. "" Then GoTo FINISH
  18. $!
  19. $!     Check logical name table argument and default if necessary.
  20. $!
  21. $ TABLE = F$Edit (P3, "UNCOMMENT, UPCASE, TRIM")
  22. $ If (TABLE .eqs. "PROCESS")
  23. $    Then
  24. $    Else If (TABLE .eqs. "GROUP")
  25. $            Then
  26. $            Else If (TABLE .eqs. "JOB")
  27. $                    Then
  28. $                    Else If (TABLE .eqs. "SYSTEM")
  29. $                            Then
  30. $                            Else
  31. $                                TABLE = "Process"
  32. $                         EndIf
  33. $                 EndIf
  34. $         EndIf
  35. $ EndIf
  36. $!
  37. $! Check the first value in the library list
  38. $ LIB = P1
  39. $ X = F$TrnLnm (LIB, "LNM$''TABLE'")
  40. $ If X .eqs. "" Then GoTo INSERT
  41. $ If X .eqs. P2 Then GoTo FINISH
  42. $!
  43. $! Find the first free logical to assign the library file to
  44. $ BASE = P1 + "_"
  45. $ N = 1
  46. $NEXTLIB:
  47. $   LIB := 'BASE''N'
  48. $   X = F$TrnLnm (LIB, "LNM$''TABLE'")
  49. $   If X .eqs. "" Then GoTo INSERT
  50. $   If X .eqs. P2 Then GoTo FINISH
  51. $   N = N + 1
  52. $   GoTo NEXTLIB
  53. $!
  54. $! Add the library file to the library file list
  55. $INSERT:
  56. $   Define /'TABLE' 'LIB' 'P2'
  57. $FINISH:
  58. $   VERIFY = F$Verify (VERIFY)
  59. $   Exit
  60.